<!DOCTYPE html>
<html lang="en">
<head>
    <#import "../common/common.macro.ftl" as netCommon>
	<@netCommon.commonStyle />
</head>
<body>
<div class="wrapper">

    <section class="content">
        <div class="row">
            <div class="col-xs-12">
                <div class="box">
                    <form id="addAppUserForm">
                        <input id="appId" type="hidden" class="form-control" name="appId" value="${appId!''}">
                        <input id="username" type="hidden" class="form-control" name="username" value="${username!''}">
                        <div class="form-group">
                            <select multiple="multiple" name="duallistbox_appUser[]" id="duallist">
                            <#if inAppRoles?exists >
                            <#list inAppRoles as item>
                            <option selected value="${item.id}">${item.roleName}--${item.roleDesc}</option>
                            </#list>
                            </#if>
                            <#if notInAppRoles?exists >
                            <#list notInAppRoles as item>
                            <option value="${item.id}">${item.roleName}--${item.roleDesc}</option>
                            </#list>
                            </#if>
                            </select>
                        </div>

                        <div class="form-group">
                            <input id="leader" name="leader" type="hidden" class="form-control" value="${isLeader?string("true","false")}">
                            <label>
                                <input type="radio" name="isLeader" id="isLeader1" value="true"  <#if isLeader?exists && isLeader==true>checked</#if>> 项目负责人
                            </label>
                            <br>
                            <label>
                                <input type="radio" name="isLeader" id="isLeader2" value="false"  <#if isLeader?exists && isLeader==false>checked</#if>> 普通成员
                            </label>
                        </div>
                    </form>
                </div>
            </div>
        </div>
        <div class="row">
            <div class="col-md-4">

            </div>
            <div class="col-md-2">
                <button onclick="addAppUserRole()" type="button" class="btn btn-block btn-primary btn-xs">添加</button>
            </div>
            <div class="col-md-2">
                <button onclick="closePage()" type="button" class="btn btn-block btn-primary btn-xs">取消</button>
            </div>
        </div>
    </section>

</div>

<@netCommon.commonScript />
<script src="${request.contextPath}/static/js/app.js" >
    $('#isLeader1').iCheck({});
    $('#isLeader2').iCheck({});
</script>
</body>
</html>